{% extends "layout.html" %}
{% block title %}
<title>小试牛刀</title>
{% endblock %}

{% block style %}

{% endblock %}

{% block li %}
    <li><a href="content.html">任务小智</a></li>
    <li>测验列表</li>
{% endblock %}

{% block content %}


    <div class="admin">
			<div class="panel admin-panel">
                <div class="panel-head"><strong>测验列表</strong></div>
                <table class="table table-hover">
                    <tr>
                        <th width="240">编号</th>
                        <th width="240"><span style="padding-left: 20px">名称</span></th>
                        <th width="240"><span style="padding-left: 24px">开始时间</span></th>
                        <th width="100"><span style="padding-left: 24px">结束时间</span></th>
                    </tr>
                    {% for each in release %}
                        <tr onclick="submitForm(this)">
                            <form action="/exam.html/" method="get" id="form{{ forloop.counter }}">
                                <td style="padding-left: 18px">{{ forloop.counter }}</td>
                                <td >{{ each.name }}</td>
                                <td>{{ each.start}}</td>
                                <td>{{ each.end}}</td>
                                <input type="hidden" name="subjectId" value="{{ each.subject.subId}}">
                                <input type="hidden" name="testName" value="{{ each.name}}">
                                <input type="hidden" name="clzId" value="{{ each.clz.clsId}}">
                            </form>
                        </tr>
                    {% endfor %}

                </table>


			    <p class="text-right text-gray"><a class="text-gray" target="_blank" href="http://www.pintuer.com"></a></p>
            </div>
    </div>

{% endblock %}

{% block js %}
    <script>
        $(function () {
            $('#test').addClass('active')
            $('#home').removeClass('active')
        });
        var submitForm = function (obj) {
            var str = $(obj).children()[0]
            var form = $(str ).prop('id')
            $('#'+form).submit()
        }
    </script>
{% endblock %}
</html>